home *** CD-ROM | disk | FTP | other *** search
/ Aminet 16 / Aminet 16 (1996)(GTI - Schatztruhe)[!][Dec 1996].iso / Aminet / dev / src / wangisrc.lha / wangi / z / wpad_library / WP_GetPadAttrs.c < prev    next >
C/C++ Source or Header  |  1995-08-27  |  1KB  |  61 lines

  1. /***************************************************************************
  2.  * WP_GetPadAttrs.c
  3.  *
  4.  * wpad.library, Copyright ©1995 Lee Kindness.
  5.  *
  6.  * WP_GetPadAttrs()
  7.  */
  8.  
  9. #include "wpad_global.h"
  10.  
  11. /****** wpad.library/WP_GetPadAttrsA ******************************************
  12. *
  13. *   NAME   
  14. *
  15. *   SYNOPSIS
  16. *
  17. *   FUNCTION
  18. *
  19. *   INPUTS
  20. *
  21. *   RESULT
  22. *
  23. *   EXAMPLE
  24. *
  25. *   NOTES
  26. *
  27. *   BUGS
  28. *
  29. *   SEE ALSO
  30. *
  31. *****************************************************************************
  32. *
  33. */
  34.  
  35. LONG LIBENT WP_GetPadAttrsA( REG(a0) struct Pad *pad, REG(a1) struct TagItem *tags)
  36. {
  37.     if( pad )
  38.     {
  39.         struct MsgPort *port;
  40.  
  41.         /* Open message port */
  42.         if( port = CreateMsgPort() )
  43.         {
  44.             struct WPMsg *msg;
  45.             if( msg = AllocVec(sizeof(struct WPMsg), MEMF_CLEAR) )
  46.             {
  47.                 msg->wpm_Node.ln_Type = NT_MESSAGE;
  48.                 msg->wpm_Length = sizeof(struct WPMsg);
  49.                 msg->wpm_ReplyPort = port;
  50.                 msg->wpm_Action = WPM_ACTION_GETATTRS;
  51.                 msg->wpm_Data = tags;
  52.                 PutMsg(pad->pad_MsgPort, msg);
  53.                 WaitPort(port);
  54.                 GetMsg(port);
  55.             }
  56.             DeleteMsgPort(port);
  57.         }
  58.     }
  59.     return( 0 );
  60. }
  61.